package com.devilvan.betrice.vo;

import com.devilvan.betrice.constant.AdminConstant;
import com.devilvan.betrice.controller.LoginController;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author Evad.Wu
 * @Description 登录功能 值对象传递 {@link LoginController#sysLogin()}
 * @date 2023-08-11
 */
@Data
public class LoginVo {
    /**
     * 用户名
     */
    @NotBlank(message = "{user.username.not.null}")
    @Length(min = AdminConstant.USERNAME_MIN_LENGTH, max = AdminConstant.USERNAME_MAX_LENGTH, message = "{user.username.length.invalid}")
    private String username;

    /**
     * 用户密码
     */
    @NotBlank(message = "{user.password.not.null}")
    @Length(min = AdminConstant.PASSWORD_MIN_LENGTH, max = AdminConstant.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
    private String password;

    /**
     * 验证码
     */
    private String code;

    /**
     * 唯一标识
     */
    private String uuid;
}
